package com.example.doctor.jpa;

import com.example.common.entity.XDrugTempleteDrug;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import javax.transaction.Transactional;

public interface XDrugTempleteDrugRepository extends JpaRepository<XDrugTempleteDrug,Long> {

    @Transactional
    @Modifying
    @Query(value = "DELETE FROM x_drug_templete_drug WHERE t_id_bigint =:tId",nativeQuery = true)
    void deleteByTiD(@Param("tId") Long tId);
}
